import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const home = ()=>import('../views/home/Home')
const category = ()=>import('../views/category/Category')
const my = ()=>import('../views/my/My')
const cart = ()=>import('../views/cart/Cart')
const routes = [
    {
        path:'',
        redirect:'/home'
    },{
        path:'/category',
        component:category 
    },{
        path:'/home',
        component:home
    },
    {
        path:'/my',
        component:my
    },{
        path:'/cart',
        component:cart
    }
]
const router = new VueRouter({
    routes,
    mode:'history'
})
export default router